<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<script type="text/javascript">
function emptydata()
{
	document.getElementById("searchCompany_startTime").value="";
	document.getElementById("searchCompany_endTime").value="";
}

/* 刷新dialog */
//刷新dialogId指定的dialog，url：刷新时可重新指定加载数据的url, data：为加载数据时所需的参数。 
function reloadDialog()
{
	var	startTime=document.getElementById("searchCompany_startTime").value;
	var endTime=document.getElementById("searchCompany_endTime").value;
	var companyUserId_id=document.getElementById("companyUserId_id").value;
	$.pdialog.reload("companyUserAction.action?toResult=companyUserOrders&startTime="+startTime+"&endTime="+endTime+"&companyUserId="+companyUserId_id, {dialogId:"dlg_page_order", callback:null});
}
	


</script>

<form id="pagerForm" action="companyUserAction.action?toResult=companyUserOrders">
	<div id="chedkBoxValues" style="display: none"></div>
	<input type="hidden" name="status" value="${param.status}">
	<input type="hidden" name="keywords" value="${param.keywords}" /> 
	<input type="hidden" name="pageNum" value="${page.currentPage }" /> 
	<input type="hidden" name="pageSize" value="${page.pageSize }" />
	<input type="hidden" name="companyUserId" value="${companyUserId}">
	<input type="hidden" name="startTime" value="${startTime}">
	<input type="hidden" name="endTime" value="${endTime}">
</form>

<div class="pageHeader">
	
		<table>					
			<tr>
				<td>开始时间: <input id="searchCompany_startTime" type="text"
					class="date" name="startTime" value="${startTime}" 	readonly="readonly" />
					<input id="companyUserId_id" type="hidden" name="companyUserId" value="${companyUserId}">
				</td>

				<td>结束时间: <input id="searchCompany_endTime" type="text"
					class="date" name="endTime" value="${endTime}" readonly="readonly" />
				</td>
				<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
				<td>
					<div class="buttonActive">
						<div class="buttonContent">
							<button type="button" onclick="emptydata()">清空</button>
						</div>
					</div>

					<div class="buttonActive">
						<div class="buttonContent">
							<button type="submit" onclick="reloadDialog()">检索</button>
						</div>
					</div>
				</td>
			</tr>
		</table>

</div>
<div class="pageContent">
	<table class="list" layoutH="118" targetType="dialog" width="100%">
		<thead>
			<tr>
				<th align="center">序号</th>
				<th align="center">基础订单号</th>
				<th align="center">用户名</th>
				<th align="center">寄件人电话</th>
				<th align="center">寄件人姓名</th>
				<th align="center">订单来源</th>
				<th align="center">订单状态</th>
				 <th align="center">快递公司</th>
				<th align="center">快递网点</th>
				<th align="center">寄件地址</th>
				<th align="center">收件地址</th>
				<th align="center">生成日期</th>
			</tr>
		</thead>
		<tbody>
		<s:iterator var="orders" value="page.data" status="st">
			<tr target="sid_support" rel="<s:property value="#orders.id" />">
				<th width="1%" align="center"><s:property
						value="page.pageSize * (page.currentPage-1) + #st.index + 1" /></th>
				<th width="3%" align="left"><s:property
						value="#orders.baseOrderNo" /></th>
				<th width="3%" align="left"><s:property
						value="#orders.wxOpenId" /></th>
				<%--<th width="3%" align="left"><s:property value="#orders.wxOpenId" /></th> --%>
				<th width="3%" align="left"><s:property
						value="#orders.senderTelephone" /></th>
				<th width="6%" align="left"><s:property
						value="#orders.senderName" /></th>
				<th width="3%" align="left"><s:property value="#orders.source" /></th>
				<th width="3%" align="left"><s:if
						test="#orders.orderStatus=='NOT_ASSIGNED'">
						<span style="color: blue">等待接单</span>
					</s:if> <s:elseif
						test="#orders.orderStatus=='NETSITE_CANCELLED_NOTINAREA'">
						<span style="color: purple">不在范围</span>
					</s:elseif> <s:elseif
						test="#orders.orderStatus=='NETSITE_CANCELLED_MENDACIOUS'">
						<span style="color: grey">虚假订单</span>
					</s:elseif> <s:elseif test="#orders.orderStatus=='ACCEPTED'">
						<span style="color: RosyBrown">等待取件_未打印</span>
					</s:elseif> <s:elseif test="#orders.orderStatus=='ACCEPTED_PRINTED'">
						<span style="color: brown">等待取件_已打印</span>
					</s:elseif> <s:elseif test="#orders.orderStatus=='PICKED'">
						<span style="color:DarkOrchid">取件成功_未录入</span>
					</s:elseif> <s:elseif test="#orders.orderStatus=='PICKED_INPUT'">
						<span style="color: green">取件成功_已录入</span>
					</s:elseif><s:elseif test="#orders.orderStatus=='CANCELLED'">
						<span style="color: red">订单取消</span>
					</s:elseif></th>
				<%-- <th width="3%" align="left"><s:property value="#orders.courierName" /></th>
						<th width="4%" align="left"><s:property value="#orders.expressOrderNo" /></th>--%>
				<th width="7%" align="left"><s:property
						value="#orders.expressCompanyName" /></th>
				<th width="7%" align="left"><s:if
						test="#orders.netsiteName==null">
						<span style="color: red">待分配网点</span>
					</s:if> <s:elseif test="#orders.netsiteName!=null">
						<s:property value="#orders.netsiteName" />
					</s:elseif></th>
				<th width="11%" align="left"><s:property
						value="#orders.fromProvinceName" /> <s:property
						value="#orders.fromCityName" /> <s:property
						value="#orders.fromDistrictName" /> <s:property
						value="#orders.fromAddress" /></th>
				<th width="11%" align="left"><s:property
						value="#orders.toProvinceName" /> <s:property
						value="#orders.toCityName" /> <s:property
						value="#orders.toDistrictName" /> <s:property
						value="#orders.toAddress" /></th>
				<th width="5%" align="center"><s:date name='#orders.xdDate'
						format='yyyy-MM-dd HH:mm:ss' /></th>
			</tr>
		</s:iterator>
		</tbody>
	</table>

	<div class="panelBar">
		<div class="pages">
			<span>共${page.totalNum }条，共${page.totalPage }页</span>
		</div>
		<div class="pagination" targetType="dialog" totalCount="${page.totalNum }" numPerPage="${page.pageSize }" pageNumShown="10" currentPage="${page.currentPage }"></div>
	</div>
</div>

